%% plot Disturbance Observer

figure(1)
set(gcf, 'color', 'white'),     %set background of current plot figure to white
subplot(2,1,1),
plot(wmref, 'k--'), hold on,
plot(wm, 'r'), hold on,
grid on,
axis([0 0.5 -1500 1500]),
xlabel('t(s)'),
ylabel('Speed(rpm)'),

subplot(2,1,2),
plot(TLref)
grid on,
axis([0 0.5 -4.5*0.0382 4.5*0.0382]),
xlabel('t(s)'),
ylabel('Load Toqure(Nm)')
% p1 = find(abs(wm_scsi_090.Time-0.105)<1e-6);
% text(wm_scsi_090.Time(p1),wm_scsi_090.data(p1), 'o', 'color', 'm');
% text(wm_scsi_090.Time(p1),wm_scsi_090.data(p1),['(',num2str(wm_scsi_090.Time(p1)),', ',num2str(round(wm_scsi_090.data(p1))),')']);
% p2 = find(abs(wm_scsi_090.Time-0.11)<1e-6)
% text(wm_scsi_090.Time(p2)+0.05,wm_scsi_090.data(p2), 'o', 'color', 'b');
% text(wm_scsi_090.Time(p2)+0.05,wm_scsi_090.data(p2),['(',num2str(wm_scsi_090.Time(p2)),', ',num2str(round(wm_scsi_090.data(p2))),')']);
% 
% subplot(2,1,2)
% % plot(Iqref_ccsi_100_h_5, 'k--'), hold on,
% plot(Iq_ccsi_150_h_10, 'r'), hold on,
% plot(Iq_scsi_090, 'b'),
% grid on,
% axis([0.09 0.12 -12 12]),
% xlabel('t(s)'),
% ylabel('Iq(rpm)'),


